package com.bwhx.eruler.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.User;
import com.bwhx.eruler.dao.UserDao;
import com.bwhx.eruler.service.UserService;

/**
 * @Description:
 */
@Service
public class UserServiceImpl implements UserService {
	@Autowired 
	UserDao userDao;

	//带条件查询
	public List<User> find(User user) {
		return userDao.find(user);
	}

	
	public User get(Serializable id) {
		// TODO Auto-generated method stub
		return null;
	}

	
	public void insert(User user) {
		userDao.insert(user);
		
	}

	
	public void update(User user) {
		userDao.update(user);
		
	}

	
	public void delete(Serializable id) {

		userDao.delete(id);
		
	}

	
	public void delete(Serializable[] ids) {
		// TODO Auto-generated method stub
		
	}


	@Override
	public List<User> findByName(String username) {
		
		return userDao.findByName(username);
	}


	@Override
	public List<User> findByMoblie(String mobile) {
		// TODO Auto-generated method stub
		return userDao.findByMoblie(mobile);
	}


	@Override
	public void updateByMobile(User user) {
		userDao.updateByMobile(user);
		
	}


	@Override
	public User find(Integer id) {
		return userDao.find(id);
	}


	@Override
	public List<User> list(Page p) {
		return userDao.list(p);
	}


	@Override
	public Integer count(User user) {
		return userDao.count(user);
	}


	@Override
	public void update(Map<String, Object> mapupdate) {
		userDao.update(mapupdate);
		
	}


	@Override
	public List<User> listRulerUser(Page p) {
		return userDao.listRulerUser(p);
	}


	@Override
	public Integer countRulerUser(Integer rulerId) {
		return userDao.countRulerUser(rulerId);
	}




}
